<?php

//fonction de load class
function classloader($className){
	$filename='lib/class/'.$className.'.class.php';
	if (is_file($filename)){
		require_once $filename;
	}
}

function entityloader($entityName){
	$filename='lib/entity/'.$entityName.'.entity.php';
	if (is_file($filename)){
		require_once $filename;
	}
}

spl_autoload_register('classloader');
spl_autoload_register('entityloader');